//
//  itBaseViewController.swift
//  iiatn
//
//  Created by mnine on 18/3/25.
//  Copyright © 2018年 mnine. All rights reserved.
//

import UIKit
import SVProgressHUD
import FDFullscreenPopGesture


class itBaseViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        
        
        //view.backgroundColor = WGlobalColor()
        view.backgroundColor = WGlobalWhiteColor()
        
        navigationController?.fd_prefersNavigationBarHidden = true
        SVProgressHUD.setDefaultStyle(SVProgressHUDStyle.custom)
        SVProgressHUD.setMinimumDismissTimeInterval(1.0)
        SVProgressHUD.setBackgroundColor(UIColor(red: 0, green: 0, blue: 0, alpha: 0.5))
        SVProgressHUD.setForegroundColor(UIColor.white)
        // 设置导航栏
        setupNav()
        // Do any additional setup after loading the view.
    }

    /// MARK: 设置导航栏
    func setupNav() {
        view.backgroundColor = UIColor.white
        navigationItem.rightBarButtonItem = UIBarButtonItem(image: UIImage(named: "Feed_SearchBtn_18x18_"), style: .plain, target: self, action: #selector(RightBBClick))
    }
    
    func RightBBClick() {
        let searchBarVC = WSearchViewController()
        navigationController?.pushViewController(searchBarVC, animated: true)
    }
    
    func LeftBBClick() {
        DrawerViewController.shareDrawer?.openLeftMenu()
    }
    
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    // 复写bar的风格 内容为轻柔型
    override var preferredStatusBarStyle: UIStatusBarStyle {
        return .lightContent
    }

}
